<template>
  	<i  class="o-icon"
	    :class="'ion-'+name"
	    :style="{
		   fontSize: size + 'px',
		   color: color
	    }"
		@click="handleIcon"></i>
</template>

<script type="text/javascript">
export default {

  	props: {
  		name:{
  			type: String,
  			required: true
		},
		size: {
			type: Number
		},
		color: {
			type: String
		},
		link: {
			type: String
		}
  	},
	methods: {
		handleIcon(){
            if(this.link) this.$router.push(this.link)
        }
	}
}
</script>

<style lang="less">
@import url("http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css");
</style>
